﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Name="BackgroundImageSettingsWindow" x:Class="PhotoStartPageControl.BackgroundImageSettings"
        Title="Background Image Settings" MinHeight="525" Width="400" MinWidth="400" Height="525" MaxHeight="525">
    <Grid>
        <RadioButton x:Name="UseLocalImageRadioButton" Content="Use Local Image" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" GroupName="ImageSource" />
        <GroupBox x:Name="FilePathGroupBox" Header="File Settings" Margin="10,30,10,0"  VerticalAlignment="Top" IsEnabled="{Binding ElementName=UseLocalImageRadioButton, Path=IsChecked}" Height="66">
            <Grid>
                <Label x:Name="FilePathLabel" Content="File Path" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,7,0,0"/>
                <TextBox x:Name="FilePathTextBox" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="65,10,85,0" />
                <Button x:Name="SelectFileButton"  Content="Select File" HorizontalAlignment="Right" VerticalAlignment="Top" Width="75" Height="23" Click="SelectFileButton_Click" Margin="0,10,5,0"/>
            </Grid>
        </GroupBox>
        <RadioButton x:Name="UseOnlineImageRadioButton" Content="Use Online Image" HorizontalAlignment="Left" Margin="10,101,0,0" VerticalAlignment="Top" GroupName="ImageSource" />
        <GroupBox x:Name="ImageUrlGroupBox" Header="Settings" VerticalAlignment="Top" Height="89" Margin="10,121,10,0" IsEnabled="{Binding ElementName=UseOnlineImageRadioButton, Path=IsChecked}">
            <Grid>
                <TextBox x:Name="ImageUrlTextBox" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,31,0,0"/>
                <Label x:Name="ImageUrlLabel" Content="Image Url" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
        </GroupBox>
        <RadioButton x:Name="UseRssFeedRadioButton" Content="Use RSS Feed" HorizontalAlignment="Left" Margin="10,215,0,0" VerticalAlignment="Top" GroupName="ImageSource" IsChecked="True" />
        <GroupBox x:Name="FeedSettingsGroupBox" Header="Feed Settings" Margin="10,235,10,0" VerticalAlignment="Top" Height="216" IsEnabled="{Binding ElementName=UseRssFeedRadioButton, Path=IsChecked}">
            <StackPanel>
                <Label x:Name="FeedUrlLabel" Content="Feed Url" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                <TextBox x:Name="FeedUrlTextBox" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="5,0,5,5" Text="http://feeds.feedburner.com/bingimages"/>
                <Label x:Name="ImageUrlXmlNodeLabel" Content="Image Url XML Node" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                <TextBox x:Name="ImageUrlXmlNodeTextBox" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="5,0,5,10" Text="/x:rss/x:channel/x:item/x:enclosure"/>
                <CheckBox x:Name="UseXmlAttributeCheckBox" Content="Use XML Attribute?" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,0,0,0" IsChecked="True"/>
                <Label x:Name="ImageUrlXmlAttributeLabel" Content="Image Url XML Attribute" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,5,0,0" />
                <TextBox x:Name="ImageUrlXmlAttributeTextBox" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Text="url" Margin="5,0,5,5"/>
            </StackPanel>
        </GroupBox>
        <Button x:Name="SaveSettingsButton" Content="Save Settings" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="80" Click="SaveSettingsButton_Click"/>
    </Grid>
</Window>
